Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improve][Connector-V2][Doris]Refactor some Doris Sink code as well as support 2pc and cdc #4235

Merged
merged 21 commits into from
Mar 8, 2023

Conversation

zy-kkk
Copy link
Member

@zy-kkk zy-kkk commented Feb 27, 2023

Purpose of this pull request

There were some problems with the existing Doris connector, and I refactor some Doris sink code as well as support 2pc and cdc

Due to insufficient workflow test resources, all Doris tests cannot be completed, so I disable the test class first. I have successfully tested it locally. Later, I will streamline the docker image so that the workflow test can be successful
image

Check list

@TyrantLucifer TyrantLucifer added this to the 2.3.1 milestone Feb 27, 2023
@zy-kkk zy-kkk marked this pull request as ready for review February 28, 2023 02:49
@zy-kkk zy-kkk changed the title [Improve][Connector-V2][Doris]Refactor some Doris Sink code and support 2pc [Improve][Connector-V2][Doris]Refactor some Doris Sink code as well as support 2pc and cdc Mar 1, 2023
CalvinKirs
CalvinKirs previously approved these changes Mar 7, 2023
@TyrantLucifer
Copy link
Member

image

It seems that CI has some problems. Please fix it.

@CalvinKirs
Copy link
Member

BTW, It is best to add an adapted Doris version

CalvinKirs
CalvinKirs previously approved these changes Mar 8, 2023
@TyrantLucifer
Copy link
Member

It seems that has some confilcts.

Copy link
Member

@TyrantLucifer TyrantLucifer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TyrantLucifer TyrantLucifer merged commit 7c4005a into apache:dev Mar 8, 2023
Comment on lines +28 to +48
/** Serializer for DorisWriterState. */
public class DorisSinkStateSerializer implements Serializer<DorisSinkState> {
@Override
public byte[] serialize(DorisSinkState dorisSinkState) throws IOException {
try (final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final DataOutputStream out = new DataOutputStream(baos)) {
out.writeUTF(dorisSinkState.getLabelPrefix());
out.flush();
return baos.toByteArray();
}
}

@Override
public DorisSinkState deserialize(byte[] serialized) throws IOException {
try (final ByteArrayInputStream bais = new ByteArrayInputStream(serialized);
final DataInputStream in = new DataInputStream(bais)) {
final String labelPrefix = in.readUTF();
final long checkpointId = in.readLong();
return new DorisSinkState(labelPrefix, checkpointId);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out.writeUTF(dorisSinkState.getLabelPrefix());

but

final String labelPrefix = in.readUTF();
final long checkpointId = in.readLong();

Not match.

@Hisoka-X
Copy link
Member

There some problem, you add support for 2pc, but you don't open 2pc in your e2e config. It cause 2pc can't pass with ci.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants